/**
 * Copyright (c) Enalean, 2016. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

.tlp-tabs {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 $tlp-spacing;
    padding: 0 $tlp-spacing;
    background: $tlp-ui-white;
    box-shadow: inset 0 1px 0 $tlp-ui-border-normal, inset 0 -1px 0 $tlp-ui-border-normal;
}

.tlp-tab-menu {
    display: flex;
    position: absolute;
    bottom: 7px;
    left: 0;
    flex-direction: column;
    min-width: 100%;
    padding: $tlp-spacing / 2 0;
    transform: translateY(100%);
    transition: bottom 150ms, opacity 150ms, box-shadow 150ms;
    border: 1px solid $tlp-ui-border-normal;
    border-top: 0;
    border-radius: 0 0 3px 3px;
    background: $tlp-ui-white;
    box-shadow: none;
    opacity: 0;
    z-index: 10000;
    pointer-events: none;
}

.tlp-tab-menu-title {
    margin: $tlp-spacing / 2 0 0;
    padding: $tlp-spacing $tlp-spacing $tlp-spacing / 2;
    border-top: 1px solid $tlp-ui-border-light;
    color: $tlp-ui-dimmed;

    &:first-child {
        margin: 0;
        padding: $tlp-spacing / 2 $tlp-spacing;
        border-top: 0;
    }
}

.tlp-tab-menu-item {
    padding: $tlp-spacing / 2 $tlp-spacing;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;

    &:hover {
        background: $tlp-ui-border-light;
    }
}

.tlp-tab {
    display: flex;
    position: relative;
    flex: 0 0 auto;
    align-items: center;
    padding: 16px 30px 14px;
    border-bottom: 2px solid transparent;
    color: $tlp-theme-color;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;

    &.tlp-tab-active,
    &:hover {
        border-bottom-color: $tlp-theme-color;
    }

    &.tlp-tab-disabled,
    &.tlp-tab-disabled:hover {
        border-bottom-color: transparent;
        color: $tlp-ui-dimmed;
        cursor: not-allowed;
    }

    &:hover > .tlp-tab-menu {
        bottom: -2px;
        transition: bottom 100ms, opacity 100ms;
        box-shadow: 0 4px 20px 3px rgba(0, 0, 0, .05);
        opacity: 1;
        pointer-events: auto;
    }

    > .fa-caret-down {
        margin: 0 0 0 8px;
    }
}

.tlp-tab-icon {
    margin: 0 8px 0 0;
    font-size: 16px;
}
